package test.ws;

import java.net.MalformedURLException;
import java.net.URL;

import javax.xml.namespace.QName;

import com.hugetech.ijlcallcenter.IJLCallCenter;
import com.hugetech.ijlcallcenter.IJLCallCenterServiceService;

public class CallCenterConfig {

	public static String nameSpace = "http://callcenter.customer.internal.service.boss.sysway.com/";
	public static String serviceName = "JLCallCenterServiceService";
	public static String portName = "IJLCallCenterServicePort";
	public static String address = "http://192.168.14.40:8085/sysway-boss-service/cxf/IJLCallCenterService?wsdl";

    public static QName SERVICE = new QName("http://WWW.HUGETECH.COM/IJLCallCenter/", "IJLCallCenterServiceService");
    public static QName IJLCallCenterPort = new QName("http://WWW.HUGETECH.COM/IJLCallCenter/", "IJLCallCenterPort");
 


	
	public  String getNameSpace() {
		return nameSpace;
	}

	public  void setNameSpace(String nameSpace) {
		CallCenterConfig.nameSpace = nameSpace;
	}

	public  String getServiceName() {
		return serviceName;
	}

	public  void setServiceName(String serviceName) {
		CallCenterConfig.serviceName = serviceName;
	}

	public  String getPortName() {
		return portName;
	}

	public  void setPortName(String portName) {
		CallCenterConfig.portName = portName;
	}

	public  String getAddress() {
		return address;
	}

	public  void setAddress(String address) {
		CallCenterConfig.address = address;
	}

	public QName getService() {
		return new QName(nameSpace, serviceName);
	}
	
	public QName getPort() {
		return new QName(nameSpace, portName);
	}
	
	public static IJLCallCenter getServicePort() {
		IJLCallCenterServiceService ijlCallCenterServiceService =null;
		try {
			ijlCallCenterServiceService = new IJLCallCenterServiceService(new URL(address),new QName(nameSpace, serviceName));
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		IJLCallCenterServiceService.IJLCallCenterPort=new QName(nameSpace, portName);
		return ijlCallCenterServiceService.getIJLCallCenterPort();
	}
	
	
	
	
}
